package myJs.companyMember

import myJs.cps.{Style}
import myJs.myPkg.{LayerOptions, NavigateOptions, ReactRouterDOM, layer}
import myJs.tool.Tool
import org.scalajs.dom.window.localStorage
import slinky.core.FunctionalComponent
import slinky.core.annotations.react
import slinky.web.html._
import typings.csstype.csstypeStrings

import scala.scalajs.js

/**
 * Created by yz on 22/4/2022
 */
@react object FooterCp {

  type Props = Unit

  val component = FunctionalComponent[Props] { props =>

    object FTool {

      def viewAgree = () => {
        val options = LayerOptions(content = "XXX", title = "使用须知", btn = List("知道了"), closeBtn = 0)
        layer.open(options)
        ()
      }

    }

    div(style := Style(textAlign = csstypeStrings.center), className := "page-footer",
      div(style := Style(textAlign = csstypeStrings.center), className := "page-footer-inner",
        div(className := "copyright",
          "版权所有2022 样品管理系统 All Rights Reserved  ", a(onClick := FTool.viewAgree, "协议文本")
        )
      )
    )

  }

}
